home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Developer Helper 1: Phil & Dave's Excellent CD
/
Excellent CD HFS.raw
/
Moof
/
Goodies
/
MPW Goodies
/
MPW Goodies⁄DTS
/
OpenCheckedOut
< prev
next >
Wrap
Text File
|
2022-08-05
|
2KB
|
82 lines
#
# File: OpenCheckedOut - open all checked-out files from all projects
#
# Usage: OpenCheckedOut
#
# OpenCheckedOut opens all the files in each CheckOutDir that
# are currently checked out for modification.
#
# Written by: Bruce Horn, Steve Capps, Larry Kenyon,
# John Meier, scott douglass, Darin Adler,
# Paul Mercer, Bryan Stearns, Dave Owens
#
# Copyright: © 1988 by Apple Computer, Inc., all rights reserved.
#
# Change History:
#
# 2/17/89 sad use ProjectInfo -s; redirect to {somewhere}
# 11/17/88 sad replace ∑ Dev:Null at end
# 11/17/88 sad finish Can’t parse logic, was accidentally checked in
# 11/17/88 sad fix for “:” as checkout dir
#
# To Do:
# Can’t handle file name with spaces.
#
Set Exit 0
# the following helps to debug until MPW sends echos to Dev:Console instead of Dev:StdErr
If {Echo} == 1
Set somewhere "∑∑ '{Worksheet}∂'"
Else
Set somewhere '∑ Dev:Null'
End
Begin
# first get all the check-out directories
Set CheckOutDirs "`CheckOutDir -m -r; Set CheckOutDirStatus {Status} ; Echo ""`"
Exit If {CheckOutDirStatus} != 0
Loop
Break If "{CheckOutDirs}" !~ / *CheckOutDir +-project ∂'«0,1»([¬:]+∫)®1∂'«0,1» ∂'«0,1»([¬∫]*:)®2∂'«0,1» (≈)®3/
Set Project "{®1}"
Set CheckOutDir "{®2}"
Set CheckOutDirs "{®3}"
# now for each directory, get all modified files in the project
Set Info "`ProjectInfo -s -a "{User}" -m -project "{Project}"; Set ProjectInfoStatus {Status}`"
# *** check status here
Set FirstNotOpened ""
Set OthersNotOpened ""
Loop
Break If "{Info}" !~ /[¬+]* ([¬,]+)®1,[0-9.a-z]+∂+ (≈)®2/
Set File "{®1}"
Set Info "{®2}"
Open "{CheckOutDir}{File}" ∑∑ "{Worksheet}"
If {Status} != 0
If "{FirstNotOpened}" == ""
Set FirstNotOpened "“{File}”"
Else
Set OthersNotOpened "{OthersNotOpened}, “{File}”"
End
End
End
If "{FirstNotOpened}" != ""
If "{OthersNotOpened}" == ""
Alert "{FirstNotOpened} is checked out from “{Project}” but is not in the “{CheckOutDir}” directory."
Else
Alert "The following files are checked out from “{Project}” but are not in the “{CheckOutDir}” directory: {FirstNotOpened}{OthersNotOpened}."
End
End
End
If "{CheckOutDirs}" != ""
Echo "### OpenCheckedOut - Couldn’t parse: " "“{CheckOutDirs}”" ∑∑ "{Worksheet}"
Exit 1
End
End {somewhere}